package com.puppet.building.mapper;

import com.puppet.building.pojo.House;
import com.puppet.building.pojo.dto.HouseDTO;
import com.puppet.building.pojo.vo.HouseVO;
import com.puppet.building.pojo.vo.StateVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface HouseMapper {
    @Select("select count(*) from house_info where building_id=#{buildingId}")
    Integer countHouseByBuildingId(Integer buildingId);

    @Select("select id,house_no from house_info")
    List<HouseVO> getHouseNoAnId();

    List<House> getAllHouse(HouseDTO houseDTO);

    List<StateVO> getHouseAnState();
}
